Skip to content

Add additional physical read/write metrics to oracledb receiver #37814

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Mar 25, 2025

Conversation

ccressent
Copy link
Contributor

Description

This PR adds the following metrics to the oracledb receiver:

  • 'physical reads direct' (disabled by default)
  • 'physical read io requests' (disabled by default)
  • 'physical writes' (enabled by default)
  • 'physical writes direct' (disabled by default)
  • 'physical write io requests' (disabled by default)

Link to tracking issue

N/A

Testing

Manual testing.

Documentation

Automatically generated by mdatagen for each metric.

Copy link

linux-foundation-easycla bot commented Feb 10, 2025

CLA Signed

The committers listed above are authorized under a signed CLA.

@ccressent ccressent marked this pull request as ready for review February 10, 2025 21:07
@ccressent ccressent requested a review from a team as a code owner February 10, 2025 21:07
@atoulme
Copy link
Contributor

atoulme commented Feb 10, 2025

Looks good, please attend to my comment. Please add a changelog.

@ccressent
Copy link
Contributor Author

@atoulme
Hi Antoine, does this look good to merge now?

Copy link
Contributor

@atoulme atoulme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@atoulme
Copy link
Contributor

atoulme commented Mar 7, 2025

Would you please run make generate on your branch to make CI pass? Thanks!

Copy link
Contributor

@fguimond fguimond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@@ -109,6 +109,51 @@ metrics:
value_type: int
input_type: string
unit: "{reads}"
oracledb.physical_reads_direct:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically the format and names of these metrics should match semantic conventions, but we're in a tough spot given existing metrics don't match. (We either match this component's existing metrics, or end up matching semantic conventions and make this component's metrics inconsistent.)

One example that I'm referring to, the semantic convention is to have read and write metrics under the same metric name, with a "direction" attribute that is used to show if the data point is for reads or writes.

I think for now it's okay to add these metrics the way this PR proposes, but we'll likely need a breaking change in the future to fix all of them together.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely something to do at another time for all the metrics in one fell swoop (and as a breaking change), if that's what we want.

One advantage of this deviation from the semantic conventions here though is that the metric names match the names from the Oracle documentation. This may help users enable/disable the metrics they care about since they also are OracleDB users if they use this receiver.

@atoulme atoulme marked this pull request as draft March 17, 2025 20:40
@atoulme
Copy link
Contributor

atoulme commented Mar 17, 2025

@ccressent moving to draft so you can look into the feedback from codeowners, please mark as ready for review afterwards.

@ccressent ccressent marked this pull request as ready for review March 19, 2025 17:23
@atoulme
Copy link
Contributor

atoulme commented Mar 20, 2025

Please try and run make -j8 generate in the root of your checkout, it will also run gofmt and fix the imports, and that will fix this PR.

@atoulme atoulme marked this pull request as draft March 20, 2025 15:18
@ccressent ccressent marked this pull request as ready for review March 24, 2025 17:46
@atoulme atoulme requested a review from crobert-1 March 24, 2025 22:06
@atoulme
Copy link
Contributor

atoulme commented Mar 25, 2025

@crobert-1 please review one more time and mark ready to merge if it looks good to you.

@atoulme atoulme merged commit 1e255c3 into open-telemetry:main Mar 25, 2025
183 checks passed
@github-actions github-actions bot added this to the next release milestone Mar 25, 2025
@ccressent ccressent deleted the add-new-oracledb-metrics branch April 7, 2025 17:12
Fiery-Fenix pushed a commit to Fiery-Fenix/opentelemetry-collector-contrib that referenced this pull request Apr 24, 2025
…-telemetry#37814)

<!--Ex. Fixing a bug - Describe the bug and how this fixes the issue.
Ex. Adding a feature - Explain what this achieves.-->
#### Description
This PR adds the following metrics to the `oracledb` receiver:
- 'physical reads direct' (disabled by default)
- 'physical read io requests' (disabled by default)
- 'physical writes' (enabled by default)
- 'physical writes direct' (disabled by default)
- 'physical write io requests' (disabled by default)

<!-- Issue number (e.g. open-telemetry#1234) or full URL to issue, if applicable. -->
#### Link to tracking issue
N/A

<!--Describe what testing was performed and which tests were added.-->
#### Testing

Manual testing.

<!--Describe the documentation added.-->
#### Documentation

Automatically generated by `mdatagen` for each metric.

---------

Co-authored-by: Antoine Toulme <[email protected]>
Co-authored-by: Curtis Robert <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants